<?php

namespace app\controllers;

use app\controllers\action\User;
use core\controller\Controller;
use db\Conn;

class logout implements Controller
{
    public static function execute()
    {
        // 连接数据库
        $conn = Conn::execute();
        $return = ["code" => 400, "data" => [], "msg" => "登出失败"];
        if (User::logout()) {
            $return["code"] = 200;
            $return["msg"] = "登出成功";
        }

        return $return;
    }
}